package com.dapeng.cleardatabackend.model.dto.user;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;

/**
 * 用户登录请求体
 *
 * @author dapeng
 */
@Data
@ApiModel(description = "用户登录请求")
public class UserLoginRequest implements Serializable {

    private static final long serialVersionUID = 4313196991800479952L;

    /**
     * 用户账号
     */
    @ApiModelProperty(value = "用户账号", required = true)
    @NotNull(message = "用户账号不能为空")
    @Size(min = 4, max = 20, message = "用户账号长度需要在4-20位之间")
    private String userAccount;

    /**
     * 用户密码
     */
    @ApiModelProperty(value = "用户密码", required = true)
    @NotNull(message = "用户密码不能为空")
    @Size(min = 8, max = 20, message = "用户密码长度需要在8-20位之间")
    private String userPassword;
}
